package com.csce.domain.entity.score;

import com.csce.domain.entity.score.vo.ScoreSheetExPlaceVo;
import com.osce.common.annotation.Excel;
import com.osce.common.core.entity.BaseEntity;
import io.swagger.annotations.ApiModelProperty;
import lombok.*;

import java.util.List;

/**
 * 评分表管理对象 score_sheet
 *
 * @author zzx
 * @since 2023-08-16
 */
@AllArgsConstructor
@NoArgsConstructor
@Data
@Builder
@ToString
@EqualsAndHashCode(callSuper = true)
public class ScoreSheet extends BaseEntity {

    private static final long serialVersionUID = 1L;

    /**
     * 主键
     */
    private Long id;

    /**
     * 技能编号
     */
    @Excel(name = "技能编号")
    @ApiModelProperty("技能编号")
    private Long skillId;

    /**
     * 模版
     */
    @Excel(name = "模版")
    @ApiModelProperty("模版")
    private String model;

    /**
     * 评分表名称
     */
    @Excel(name = "评分表名称")
    @ApiModelProperty("评分表名称")
    private String name;

    /**
     * 评分表题目
     */
    @Excel(name = "评分表题目")
    @ApiModelProperty("评分表题目")
    private String question;

    /**
     * 步骤名称
     */
    @Excel(name = "步骤名称")
    @ApiModelProperty("步骤名称")
    private String stepName;

    /**
     * 是否拆分分数
     */
    @Excel(name = "是否拆分分数")
    @ApiModelProperty("是否拆分分数")
    private String isSplitScore;

    /**
     * 总分
     */
    @Excel(name = "总分")
    @ApiModelProperty("总分")
    private Double total;

    /**
     * 图片
     */
    @Excel(name = "图片")
    @ApiModelProperty("图片")
    private String imageUrl;

    /**
     * 预约字段1
     */
    @ApiModelProperty("总分")
    private String reservedOne;

    /**
     * 预留字段2
     */
    @ApiModelProperty("总分")
    private String reservedTwo;

    /**
     * 步骤列表
     */
    private List<ScoreSheetStep> steps;


    public ScoreSheetExPlaceVo toExPlaceVo() {
        return new ScoreSheetExPlaceVo(this.name, this.question,this.imageUrl);
    }
}
